<% 
DIRECTIVE SAFE_OUTPUT_OPEN;
var headContent = {
	include("/pages/template/head.html"){}
%>
<script type="text/javascript">
	var oper = {
		save:function(id){
			if(!validForm()) {
				return false;
			}
			id = id || '0';
			var url = 'admin/mission/save/'+id;
			form1.action = url;
			form1.submit();
			return true;
		}	
	};
</script>

<%
};
var bodyContent = {
%>
<form name="form1" action="" method="post" class="form-horizontal"
		role="form" >
	<input type="hidden" name="model.mission_id" value="${model.mission_id}" />
	<table class="table">
		<%  // 列表头部%>
								<tr>
					<td>正在进行的人数</td>
					<td>
					<input class="form-control" type="text" name="model.headcount" value="${model.headcount }"  valid='vnum' validname='正在进行的人数'  />
											</td>
				</tr>
								<tr>
					<td>红檬健康币</td>
					<td>
					<input class="form-control" type="text" name="model.hongmeng_coin" value="${model.hongmeng_coin }"  valid='vnum' validname='红檬健康币'  />
											</td>
				</tr>
								<tr>
					<td>任务名</td>
					<td>
					<input class="form-control" type="text" name="model.mission_name" value="${model.mission_name }"  />
											</td>
				</tr>
								<tr>
					<td>计划类型</td>
						<td>
							<select class="form-control" name="model.sys_plan_id">
								<option  ${model.sys_plan_id == 1?'selected': ''} value="1">减肥</option>
								<option  ${model.sys_plan_id == 2?'selected': ''} value="2">增重</option>
								<option ${model.sys_plan_id == 3?'selected': ''} value="3">保持体重</option>
							</select>
						</td>
				</tr>
								<tr>
					<td>任务类型名字</td>
					<td>
					<input class="form-control" type="text" name="model.mission_type_name" value="${model.mission_type_name }"  />
											</td>
				</tr>
								<tr>
					<td>项目阶段</td>
					<!--<td>-->
						<!--<input class="form-control" type="text" name="model.plan_stage" value="${model.plan_stage }"  valid='vnum' validname='项目阶段'  />-->
					<!--</td>-->
					<td>
					<select class="form-control" name="model.plan_stage">
						<option  ${model.plan_stage == 1?'selected': ''} value="1">初级</option>
						<option  ${model.plan_stage == 2?'selected': ''} value="2">中级</option>
						<option ${model.plan_stage == 3?'selected': ''} value="3">高级</option>
					</select>
					</td>
				</tr>
	</table>
	
	<div style="height: 50px;clear: both;">&nbsp;</div>
	<nav class="navbar navbar-default navbar-fixed-bottom">
	  <div class="container" style="padding: 5px 0px 5px 0px;text-align: center;">
		<button class="btn btn-primary" onclick="return oper.save(${model.mission_id});">保 存</button>
		<button class="btn btn-default" onclick="closeIframe();return false;">关 闭</button>
	  </div>
	</nav>
</form>
<%}; %>

<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
<%}
DIRECTIVE SAFE_OUTPUT_CLOSE; 
%>